3.1.18 \(\int \frac {1}{\sqrt {g \sin (e+f x)} \sqrt {a+a \sin (e+f x)} (c-c \sin (e+f x))} \, dx\) [18]

3.1.18.1 Optimal result
3.1.18.2 Mathematica [A] (verified)
3.1.18.3 Rubi [A] (verified)
3.1.18.4 Maple [A] (verified)
3.1.18.5 Fricas [A] (verification not implemented)
3.1.18.6 Sympy [F]
3.1.18.7 Maxima [F]
3.1.18.8 Giac [F(-1)]
3.1.18.9 Mupad [F(-1)]

3.1.18.1 Optimal result

Integrand size = 40, antiderivative size = 118 \[ \int \frac {1}{\sqrt {g \sin (e+f x)} \sqrt {a+a \sin (e+f x)} (c-c \sin (e+f x))} \, dx=-\frac {\arctan \left (\frac {\sqrt {a} \sqrt {g} \cos (e+f x)}{\sqrt {2} \sqrt {g \sin (e+f x)} \sqrt {a+a \sin (e+f x)}}\right )}{\sqrt {2} \sqrt {a} c f \sqrt {g}}+\frac {\sec (e+f x) \sqrt {g \sin (e+f x)} \sqrt {a+a \sin (e+f x)}}{a c f g} \]

output
-1/2*arctan(1/2*cos(f*x+e)*a^(1/2)*g^(1/2)*2^(1/2)/(g*sin(f*x+e))^(1/2)/(a 
+a*sin(f*x+e))^(1/2))/c/f*2^(1/2)/a^(1/2)/g^(1/2)+sec(f*x+e)*(g*sin(f*x+e) 
)^(1/2)*(a+a*sin(f*x+e))^(1/2)/a/c/f/g
 
3.1.18.2 Mathematica [A] (verified)

Time = 0.18 (sec) , antiderivative size = 132, normalized size of antiderivative = 1.12 \[ \int \frac {1}{\sqrt {g \sin (e+f x)} \sqrt {a+a \sin (e+f x)} (c-c \sin (e+f x))} \, dx=\frac {\csc (2 (e+f x)) \sin ^{\frac {3}{2}}(e+f x) \sqrt {a (1+\sin (e+f x))} \left (2 \sqrt {c} \sqrt {\sin (e+f x)}+\sqrt {2} \arctan \left (\frac {\sqrt {2} \sqrt {c} \sqrt {\sin (e+f x)}}{\sqrt {c-c \sin (e+f x)}}\right ) \sqrt {c-c \sin (e+f x)}\right )}{a c^{3/2} f \sqrt {g \sin (e+f x)}} \]

input
Integrate[1/(Sqrt[g*Sin[e + f*x]]*Sqrt[a + a*Sin[e + f*x]]*(c - c*Sin[e + 
f*x])),x]
 
output
(Csc[2*(e + f*x)]*Sin[e + f*x]^(3/2)*Sqrt[a*(1 + Sin[e + f*x])]*(2*Sqrt[c] 
*Sqrt[Sin[e + f*x]] + Sqrt[2]*ArcTan[(Sqrt[2]*Sqrt[c]*Sqrt[Sin[e + f*x]])/ 
Sqrt[c - c*Sin[e + f*x]]]*Sqrt[c - c*Sin[e + f*x]]))/(a*c^(3/2)*f*Sqrt[g*S 
in[e + f*x]])
 
3.1.18.3 Rubi [A] (verified)

Time = 0.87 (sec) , antiderivative size = 118, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.175, Rules used = {3042, 3417, 3042, 3261, 218, 3409, 15}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {1}{\sqrt {a \sin (e+f x)+a} (c-c \sin (e+f x)) \sqrt {g \sin (e+f x)}} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {1}{\sqrt {a \sin (e+f x)+a} (c-c \sin (e+f x)) \sqrt {g \sin (e+f x)}}dx\)

\(\Big \downarrow \) 3417

\(\displaystyle \frac {\int \frac {1}{\sqrt {g \sin (e+f x)} \sqrt {\sin (e+f x) a+a}}dx}{2 c}+\frac {\int \frac {\sqrt {\sin (e+f x) a+a}}{\sqrt {g \sin (e+f x)} (c-c \sin (e+f x))}dx}{2 a}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\int \frac {1}{\sqrt {g \sin (e+f x)} \sqrt {\sin (e+f x) a+a}}dx}{2 c}+\frac {\int \frac {\sqrt {\sin (e+f x) a+a}}{\sqrt {g \sin (e+f x)} (c-c \sin (e+f x))}dx}{2 a}\)

\(\Big \downarrow \) 3261

\(\displaystyle \frac {\int \frac {\sqrt {\sin (e+f x) a+a}}{\sqrt {g \sin (e+f x)} (c-c \sin (e+f x))}dx}{2 a}-\frac {a \int \frac {1}{\frac {\cos (e+f x) \cot (e+f x) a^3}{\sin (e+f x) a+a}+2 a^2}d\frac {a \cos (e+f x)}{\sqrt {g \sin (e+f x)} \sqrt {\sin (e+f x) a+a}}}{c f}\)

\(\Big \downarrow \) 218

\(\displaystyle \frac {\int \frac {\sqrt {\sin (e+f x) a+a}}{\sqrt {g \sin (e+f x)} (c-c \sin (e+f x))}dx}{2 a}-\frac {\arctan \left (\frac {\sqrt {a} \sqrt {g} \cos (e+f x)}{\sqrt {2} \sqrt {a \sin (e+f x)+a} \sqrt {g \sin (e+f x)}}\right )}{\sqrt {2} \sqrt {a} c f \sqrt {g}}\)

\(\Big \downarrow \) 3409

\(\displaystyle -\frac {\int \frac {\sec (e+f x) (\sin (e+f x) a+a) \tan (e+f x)}{a^2 c}d\frac {a \cos (e+f x)}{\sqrt {g \sin (e+f x)} \sqrt {\sin (e+f x) a+a}}}{f}-\frac {\arctan \left (\frac {\sqrt {a} \sqrt {g} \cos (e+f x)}{\sqrt {2} \sqrt {a \sin (e+f x)+a} \sqrt {g \sin (e+f x)}}\right )}{\sqrt {2} \sqrt {a} c f \sqrt {g}}\)

\(\Big \downarrow \) 15

\(\displaystyle \frac {\sec (e+f x) \sqrt {a \sin (e+f x)+a} \sqrt {g \sin (e+f x)}}{a c f g}-\frac {\arctan \left (\frac {\sqrt {a} \sqrt {g} \cos (e+f x)}{\sqrt {2} \sqrt {a \sin (e+f x)+a} \sqrt {g \sin (e+f x)}}\right )}{\sqrt {2} \sqrt {a} c f \sqrt {g}}\)

input
Int[1/(Sqrt[g*Sin[e + f*x]]*Sqrt[a + a*Sin[e + f*x]]*(c - c*Sin[e + f*x])) 
,x]
 
output
-(ArcTan[(Sqrt[a]*Sqrt[g]*Cos[e + f*x])/(Sqrt[2]*Sqrt[g*Sin[e + f*x]]*Sqrt 
[a + a*Sin[e + f*x]])]/(Sqrt[2]*Sqrt[a]*c*f*Sqrt[g])) + (Sec[e + f*x]*Sqrt 
[g*Sin[e + f*x]]*Sqrt[a + a*Sin[e + f*x]])/(a*c*f*g)
 

3.1.18.3.1 Defintions of rubi rules used

rule 15
Int[(a_.)*(x_)^(m_.), x_Symbol] :> Simp[a*(x^(m + 1)/(m + 1)), x] /; FreeQ[ 
{a, m}, x] && NeQ[m, -1]
 

rule 218
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R 
t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3261
Int[1/(Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]*Sqrt[(c_.) + (d_.)*sin[(e 
_.) + (f_.)*(x_)]]), x_Symbol] :> Simp[-2*(a/f)   Subst[Int[1/(2*b^2 - (a*c 
 - b*d)*x^2), x], x, b*(Cos[e + f*x]/(Sqrt[a + b*Sin[e + f*x]]*Sqrt[c + d*S 
in[e + f*x]]))], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && 
 EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0]
 

rule 3409
Int[Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]/(Sqrt[(g_.)*sin[(e_.) + (f_. 
)*(x_)]]*((c_) + (d_.)*sin[(e_.) + (f_.)*(x_)])), x_Symbol] :> Simp[-2*(b/f 
)   Subst[Int[1/(b*c + a*d + c*g*x^2), x], x, b*(Cos[e + f*x]/(Sqrt[g*Sin[e 
 + f*x]]*Sqrt[a + b*Sin[e + f*x]]))], x] /; FreeQ[{a, b, c, d, e, f, g}, x] 
 && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0]
 

rule 3417
Int[1/(Sqrt[(g_.)*sin[(e_.) + (f_.)*(x_)]]*Sqrt[(a_) + (b_.)*sin[(e_.) + (f 
_.)*(x_)]]*((c_) + (d_.)*sin[(e_.) + (f_.)*(x_)])), x_Symbol] :> Simp[b/(b* 
c - a*d)   Int[1/(Sqrt[g*Sin[e + f*x]]*Sqrt[a + b*Sin[e + f*x]]), x], x] - 
Simp[d/(b*c - a*d)   Int[Sqrt[a + b*Sin[e + f*x]]/(Sqrt[g*Sin[e + f*x]]*(c 
+ d*Sin[e + f*x])), x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && NeQ[b*c - 
a*d, 0] && (EqQ[a^2 - b^2, 0] || EqQ[c^2 - d^2, 0])
 
3.1.18.4 Maple [A] (verified)

Time = 3.40 (sec) , antiderivative size = 130, normalized size of antiderivative = 1.10

method result size
default \(-\frac {\left (2 \cos \left (f x +e \right ) \sqrt {\csc \left (f x +e \right )-\cot \left (f x +e \right )}\, \arctan \left (\sqrt {\csc \left (f x +e \right )-\cot \left (f x +e \right )}\right )+1-\cos \left (f x +e \right )-\cos \left (f x +e \right ) \cot \left (f x +e \right )+\csc \left (f x +e \right )\right ) \left (1+\cos \left (f x +e \right )\right )}{c f \left (-\cos \left (f x +e \right )+\sin \left (f x +e \right )-1\right ) \sqrt {a \left (1+\sin \left (f x +e \right )\right )}\, \sqrt {g \sin \left (f x +e \right )}}\) \(130\)

input
int(1/(c-c*sin(f*x+e))/(g*sin(f*x+e))^(1/2)/(a+a*sin(f*x+e))^(1/2),x,metho 
d=_RETURNVERBOSE)
 
output
-1/c/f*(2*cos(f*x+e)*(csc(f*x+e)-cot(f*x+e))^(1/2)*arctan((csc(f*x+e)-cot( 
f*x+e))^(1/2))+1-cos(f*x+e)-cos(f*x+e)*cot(f*x+e)+csc(f*x+e))*(1+cos(f*x+e 
))/(-cos(f*x+e)+sin(f*x+e)-1)/(a*(1+sin(f*x+e)))^(1/2)/(g*sin(f*x+e))^(1/2 
)
 
3.1.18.5 Fricas [A] (verification not implemented)

Time = 0.37 (sec) , antiderivative size = 391, normalized size of antiderivative = 3.31 \[ \int \frac {1}{\sqrt {g \sin (e+f x)} \sqrt {a+a \sin (e+f x)} (c-c \sin (e+f x))} \, dx=\left [\frac {\sqrt {2} a g \sqrt {-\frac {1}{a g}} \cos \left (f x + e\right ) \log \left (-\frac {4 \, \sqrt {2} {\left (3 \, \cos \left (f x + e\right )^{2} + {\left (3 \, \cos \left (f x + e\right ) + 4\right )} \sin \left (f x + e\right ) - \cos \left (f x + e\right ) - 4\right )} \sqrt {a \sin \left (f x + e\right ) + a} \sqrt {g \sin \left (f x + e\right )} \sqrt {-\frac {1}{a g}} - 17 \, \cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )^{2} - {\left (17 \, \cos \left (f x + e\right )^{2} + 14 \, \cos \left (f x + e\right ) - 4\right )} \sin \left (f x + e\right ) + 18 \, \cos \left (f x + e\right ) + 4}{\cos \left (f x + e\right )^{3} + 3 \, \cos \left (f x + e\right )^{2} + {\left (\cos \left (f x + e\right )^{2} - 2 \, \cos \left (f x + e\right ) - 4\right )} \sin \left (f x + e\right ) - 2 \, \cos \left (f x + e\right ) - 4}\right ) + 8 \, \sqrt {a \sin \left (f x + e\right ) + a} \sqrt {g \sin \left (f x + e\right )}}{8 \, a c f g \cos \left (f x + e\right )}, \frac {\sqrt {2} a g \sqrt {\frac {1}{a g}} \arctan \left (\frac {\sqrt {2} \sqrt {a \sin \left (f x + e\right ) + a} \sqrt {g \sin \left (f x + e\right )} \sqrt {\frac {1}{a g}} {\left (3 \, \sin \left (f x + e\right ) - 1\right )}}{4 \, \cos \left (f x + e\right ) \sin \left (f x + e\right )}\right ) \cos \left (f x + e\right ) + 4 \, \sqrt {a \sin \left (f x + e\right ) + a} \sqrt {g \sin \left (f x + e\right )}}{4 \, a c f g \cos \left (f x + e\right )}\right ] \]

input
integrate(1/(c-c*sin(f*x+e))/(g*sin(f*x+e))^(1/2)/(a+a*sin(f*x+e))^(1/2),x 
, algorithm="fricas")
 
output
[1/8*(sqrt(2)*a*g*sqrt(-1/(a*g))*cos(f*x + e)*log(-(4*sqrt(2)*(3*cos(f*x + 
 e)^2 + (3*cos(f*x + e) + 4)*sin(f*x + e) - cos(f*x + e) - 4)*sqrt(a*sin(f 
*x + e) + a)*sqrt(g*sin(f*x + e))*sqrt(-1/(a*g)) - 17*cos(f*x + e)^3 - 3*c 
os(f*x + e)^2 - (17*cos(f*x + e)^2 + 14*cos(f*x + e) - 4)*sin(f*x + e) + 1 
8*cos(f*x + e) + 4)/(cos(f*x + e)^3 + 3*cos(f*x + e)^2 + (cos(f*x + e)^2 - 
 2*cos(f*x + e) - 4)*sin(f*x + e) - 2*cos(f*x + e) - 4)) + 8*sqrt(a*sin(f* 
x + e) + a)*sqrt(g*sin(f*x + e)))/(a*c*f*g*cos(f*x + e)), 1/4*(sqrt(2)*a*g 
*sqrt(1/(a*g))*arctan(1/4*sqrt(2)*sqrt(a*sin(f*x + e) + a)*sqrt(g*sin(f*x 
+ e))*sqrt(1/(a*g))*(3*sin(f*x + e) - 1)/(cos(f*x + e)*sin(f*x + e)))*cos( 
f*x + e) + 4*sqrt(a*sin(f*x + e) + a)*sqrt(g*sin(f*x + e)))/(a*c*f*g*cos(f 
*x + e))]
 
3.1.18.6 Sympy [F]

\[ \int \frac {1}{\sqrt {g \sin (e+f x)} \sqrt {a+a \sin (e+f x)} (c-c \sin (e+f x))} \, dx=- \frac {\int \frac {1}{\sqrt {g \sin {\left (e + f x \right )}} \sqrt {a \sin {\left (e + f x \right )} + a} \sin {\left (e + f x \right )} - \sqrt {g \sin {\left (e + f x \right )}} \sqrt {a \sin {\left (e + f x \right )} + a}}\, dx}{c} \]

input
integrate(1/(c-c*sin(f*x+e))/(g*sin(f*x+e))**(1/2)/(a+a*sin(f*x+e))**(1/2) 
,x)
 
output
-Integral(1/(sqrt(g*sin(e + f*x))*sqrt(a*sin(e + f*x) + a)*sin(e + f*x) - 
sqrt(g*sin(e + f*x))*sqrt(a*sin(e + f*x) + a)), x)/c
 
3.1.18.7 Maxima [F]

\[ \int \frac {1}{\sqrt {g \sin (e+f x)} \sqrt {a+a \sin (e+f x)} (c-c \sin (e+f x))} \, dx=\int { -\frac {1}{\sqrt {a \sin \left (f x + e\right ) + a} {\left (c \sin \left (f x + e\right ) - c\right )} \sqrt {g \sin \left (f x + e\right )}} \,d x } \]

input
integrate(1/(c-c*sin(f*x+e))/(g*sin(f*x+e))^(1/2)/(a+a*sin(f*x+e))^(1/2),x 
, algorithm="maxima")
 
output
-integrate(1/(sqrt(a*sin(f*x + e) + a)*(c*sin(f*x + e) - c)*sqrt(g*sin(f*x 
 + e))), x)
 
3.1.18.8 Giac [F(-1)]

Timed out. \[ \int \frac {1}{\sqrt {g \sin (e+f x)} \sqrt {a+a \sin (e+f x)} (c-c \sin (e+f x))} \, dx=\text {Timed out} \]

input
integrate(1/(c-c*sin(f*x+e))/(g*sin(f*x+e))^(1/2)/(a+a*sin(f*x+e))^(1/2),x 
, algorithm="giac")
 
output
Timed out
 
3.1.18.9 Mupad [F(-1)]

Timed out. \[ \int \frac {1}{\sqrt {g \sin (e+f x)} \sqrt {a+a \sin (e+f x)} (c-c \sin (e+f x))} \, dx=\int \frac {1}{\sqrt {g\,\sin \left (e+f\,x\right )}\,\sqrt {a+a\,\sin \left (e+f\,x\right )}\,\left (c-c\,\sin \left (e+f\,x\right )\right )} \,d x \]

input
int(1/((g*sin(e + f*x))^(1/2)*(a + a*sin(e + f*x))^(1/2)*(c - c*sin(e + f* 
x))),x)
 
output
int(1/((g*sin(e + f*x))^(1/2)*(a + a*sin(e + f*x))^(1/2)*(c - c*sin(e + f* 
x))), x)